package cn.hbads.version.config;

import java.util.function.Supplier;

public class DefaultVersionStrategyConfigProvider implements VersionStrategyConfigProvider {
    public static final DefaultVersionStrategyConfigProvider INSTANCE = new DefaultVersionStrategyConfigProvider();
    public static final Supplier<VersionStrategyConfigProvider> INSTANCE_SUPPLIER = () -> INSTANCE;
    public static final String DEFAULT_FULL_RECORD_MSG_FORMAT = "变更前：{{name}：{before}}，变更后：{{name}：{after}}";
    public static final String DEFAULT_CONCISE_RECORD_MSG_FORMAT = "{name}：{before} -> {after}";
    public static final String NULL_VALUE_SHOW_STRING = "--";

    private DefaultVersionStrategyConfigProvider() {

    }

    @Override
    public boolean isEnableOperationLog() {
        return true;
    }

    @Override
    public boolean isEnableCalendar() {
        return true;
    }

    @Override
    public boolean isEnableAutoMergeSameVersion() {
        return true;
    }

    @Override
    public boolean isMergeSameTypeListElementChange() {
        return false;
    }

    @Override
    public String getNullValueShowStr() {
        return NULL_VALUE_SHOW_STRING;
    }

    @Override
    public String getFullRecordMessageFormat() {
        return DEFAULT_FULL_RECORD_MSG_FORMAT;
    }

    @Override
    public String getConciseRecordMessageFormat() {
        return DEFAULT_CONCISE_RECORD_MSG_FORMAT;
    }
}
